﻿using Asteroids.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Asteroids.Entities.Components
{
    public class VertexPrimitiveRenderComponent : Component
    {
        private VertexPositionColor2D[] _model = null;
        private PrimitiveType _primitiveType;
        private Vector2 _origin;
        private float _scale;
        private bool _visible;

        public VertexPrimitiveRenderComponent()
        { Reset(); }

        /// <summary>
        /// 
        /// </summary>
        public override void Reset()
        {
            _model = new VertexPositionColor2D[0];
            _origin = Vector2.Zero;
            _primitiveType = Microsoft.Xna.Framework.Graphics.PrimitiveType.LineList;
            _scale = 1.0f;
            _visible = true;
        }

        /// <summary>
        /// 
        /// </summary>
        public VertexPositionColor2D[] Model
        { 
            get { return _model; }
            set { _model = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public PrimitiveType PrimitiveType
        {
            get { return _primitiveType; }
            set { _primitiveType = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public float Scale
        {
            get { return _scale; }
            set { _scale = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public Vector2 Origin
        {
            get { return _origin; }
            set { _origin = value; }
        }

        public bool Visible
        {
            get { return _visible; }
            set { _visible = value; }

        }
    }
}
